<template>
  <div>
    <!--条件筛选-->
     <FormPanel ref="formPanel" :list="formList" :cols="3" :labelWidth="160" :formType="type" :isSubmitBtn="false" @formChange="formChangeHandle" />

     <ButtonArea :containerStyle="{ paddingLeft: '95%' }">
       <el-button size="small" type="primary" :click="Handle">确定</el-button>
     </ButtonArea>

     <!-- <AjaxButton v-if="type !== 'show'" :click="Handle" type="primary" >确定</AjaxButton> -->
    <LazyLoadTab v-model="activeName" :tabMenus="menus">





    </LazyLoadTab>
    <div
      :style="{
        position: 'absolute',
        left: 0,
        bottom: -100,
        right: 0,
        zIndex: 0,
        borderTop: '1px solid #e9e9e9',
        padding: '10px 20px',
        background: '#fff',
        textAlign: 'right'
      }"
    >
    <!-- <template slot="controls">
        <el-button size="small" type="primary"  @click="Handle">录入首保索赔发票</el-button>

      </template> -->
      <AjaxButton v-if="type !== 'show'" :click="Handle" type="primary">取消</AjaxButton>
      <AjaxButton v-if="type !== 'show'" :click="Handle" type="primary">保存</AjaxButton>
      <AjaxButton v-if="type !== 'show'" :click="editHandle" type="primary">编辑</AjaxButton>
      <AjaxButton v-if="type !== 'show'" :click="Handle" type="primary">提交上报</AjaxButton>

    </div>
      <!-- <Drawer :visible.sync="visible" :title="录入保养索赔发票" :width="920" destroyOnClose :containerStyle="{ height: 'calc(100% - 60px)', overflow: 'auto', paddingBottom: '60px' }">
      <ReportModal  :rowData="tableData" @close="closeHandler" />
    </Drawer> -->
  </div>
</template>

<script>
import { mapState } from 'vuex';
export default {
  name: 'achieveSchedulePanel',
  components: {
  },
  // ElsaPro查询
  data() {
    return {
      activeName: '人员信息',
       // visible: false,
       formList: this.createFormList(),
       // tableData:{},
      menus: [
        {
          title: '人员信息',
          path: 'repair/queryStatistics/managementReport/personnelInformation/index'
        },
        {
          title: '维修能力',
          path: 'repair/queryStatistics/managementReport/maintenanceCapability/index'
        },
        {
          title: '维修工时',
          path: 'repair/queryStatistics/managementReport/maintenanceHours/index'
        },
        {
          title: '营业额',
          path: 'repair/queryStatistics/managementReport/turnover/index'
        },
        {
          title: '成本核算',
          path: 'repair/queryStatistics/managementReport/costAccounting/index'
        },
        {
          title: '其他信息',
          path: 'repair/queryStatistics/managementReport/otherInformation/index'
        },

      ]
    };
  },
  methods: {
     createFormList() {
      return [
        {
          type: 'DATE',
          dateType: 'month',
          label: '查询年月',
          fieldName: 'dCheckBegin',
          rules: [{ required: true, message: '请选择日期', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: '工作天数',
          initialValue:'',
          disabled:true,
          fieldName: 'addItemName'
        },
        {
          type: 'INPUT',
          label: '',
          disabled:true,
          initialValue:'',
          fieldName: ''
        }
      ];
    },

    formChangeHandle(val) {
      this.saveData = val;
    },
    editHandle(){
      this.formList.find(x => x.fieldName === 'addItemName').disabled = false;

    },
    changeHandle(val) {
      this.fetchParams = Object.assign({}, val);
    },
     collapseHandle() {
      this.$nextTick(() => {
        this.BaseTable.EXECUTE_RESET_HEIGHT();
      });
    },
    isEdit(row) {
      // console.log(row.down_tag);
      if (row.downTag == '10041001') {
        return true;
      } else {
        return false;
      }
    },
     closeHandler(val, type) {
      // 关闭
      this.visible = val;
      if (type === 'refresh') {
        // 重新加载
        this.fetchParams = { ...this.fetchParams };
      }
    }
  }

};
</script>
<style lang="less" scoped></style>
